export default {
  mounted: function(el: { addEventListener: (arg0: string, arg1: () => void) => void }, binding: { value: () => void }) {
    let timer: NodeJS.Timeout
    el.addEventListener('click', () => {
      if (timer) {
        clearTimeout(timer)
      }
      timer = setTimeout(() => {
        binding.value()
      }, 500)
    })
  }
}
